package cn.example.common.protocol.structs;

import lombok.Data;
import java.util.Map;
import cn.hutool.core.map.MapUtil;
import org.artifact.core.lang.DTO;
@Data
/**
 * 道具
 */
public class PropDTO implements DTO{
	/** 唯一标示 */
	private long id;
	/** 配置ID */
	private int cid;
	/** 数量 */
	private int num;

	public Map<Object, Object> toMap(Map<Object, Object> map){
		map.put(3355,this.id);
		map.put(98494,this.cid);
		map.put(109446,this.num);
	    return map;
	}

	public PropDTO forMap(Map<Object, Object> map){
        this.id = MapUtil.getLong(map ,3355);
        this.cid = MapUtil.getInt(map ,98494);
        this.num = MapUtil.getInt(map ,109446);
        return this;
    }
}